package com.lxp.cmsService.controller;


import com.lxp.cmsService.domain.CrmBanner;
import com.lxp.cmsService.service.CrmBannerService;
import com.lxp.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author lxp
 * @since 2021-12-06
 */
@RestController
@RequestMapping("/cmsService/crm-banner")

public class CrmBannerController {
    @Autowired
    private CrmBannerService crmBannerService;

    @GetMapping("/getAllBanner")
    public R getAllBanner(){
        List<CrmBanner> list = crmBannerService.getList();
        return R.ok().data("list",list);
    }

}

